Avoid duplication of domainID in messages.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 10 Dec 2007 11:41:40 +0000 (11:41 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 10 Dec 2007 11:41:40 +0000 (11:41 +0000)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/mm.c
xen/arch/x86/mm/paging.c
xen/arch/x86/traps.c
xen/common/event_channel.c
xen/common/schedule.c

index ff49865b994a5808b81e77393dbc0d36a5501514..0fbbd12d9ec0f70c50aab57b665325ccb4b9c754 100644 (file)
@@ -533,8 +533,7 @@ static void hvm_vcpu_down(void)
     struct domain *d = v->domain;
     int online_count = 0;
 
-    gdprintk(XENLOG_INFO, "DOM%d/VCPU%d: going offline.\n",
-           d->domain_id, v->vcpu_id);
+    gdprintk(XENLOG_INFO, "VCPU%d: going offline.\n", v->vcpu_id);
 
     /* Doesn't halt us immediately, but we'll never return to guest context. */
     set_bit(_VPF_down, &v->pause_flags);
@@ -550,8 +549,7 @@ static void hvm_vcpu_down(void)
     /* ... Shut down the domain if not. */
     if ( online_count == 0 )
     {
-        gdprintk(XENLOG_INFO, "DOM%d: all CPUs offline -- powering off.\n",
-                d->domain_id);
+        gdprintk(XENLOG_INFO, "all CPUs offline -- powering off.\n");
         domain_shutdown(d, SHUTDOWN_poweroff);
     }
 }
index 56906ca94575e46b2406aac6bf0ac82c9e7e40dc..622dafef910b814fa4cb941f3afcc69d59fbeb1e 100644 (file)
@@ -2028,8 +2028,7 @@ static int set_foreigndom(domid_t domid)
 
     if ( unlikely(domid == d->domain_id) )
     {
-        MEM_LOG("Dom %u tried to specify itself as foreign domain",
-                d->domain_id);
+        MEM_LOG("Cannot specify itself as foreign domain");
         okay = 0;
     }
     else if ( unlikely(paging_mode_translate(d)) )
@@ -2045,7 +2044,7 @@ static int set_foreigndom(domid_t domid)
             info->foreign = rcu_lock_domain(dom_io);
             break;
         default:
-            MEM_LOG("Dom %u cannot set foreign dom", d->domain_id);
+            MEM_LOG("Cannot set foreign dom");
             okay = 0;
             break;
         }
@@ -2336,8 +2335,7 @@ int do_mmuext_op(
 
             if ( paging_mode_external(d) )
             {
-                MEM_LOG("ignoring SET_LDT hypercall from external "
-                        "domain %u", d->domain_id);
+                MEM_LOG("ignoring SET_LDT hypercall from external domain");
                 okay = 0;
             }
             else if ( ((ptr & (PAGE_SIZE-1)) != 0) || 
index 38a7db6dce164e5238091d0e92122fccffa9ed11..cf5d54e2101fa3c489948d5d38e01fab40654711 100644 (file)
@@ -512,8 +512,7 @@ int paging_domctl(struct domain *d, xen_domctl_shadow_op_t *sc,
 
     if ( unlikely(d == current->domain) )
     {
-        gdprintk(XENLOG_INFO, "Dom %u tried to do a paging op on itself.\n",
-                 d->domain_id);
+        gdprintk(XENLOG_INFO, "Tried to do a paging op on itself.\n");
         return -EINVAL;
     }
 
index 35cb44b6ff1de23bf7f7734e687cbcf15871f4c6..7fb70a24e12e99cd69624e65d99a7f1f231cf144 100644 (file)
@@ -408,10 +408,9 @@ static int do_guest_trap(
         tb->flags |= TBF_INTERRUPT;
 
     if ( unlikely(null_trap_bounce(v, tb)) )
-        gdprintk(XENLOG_WARNING, "Unhandled %s fault/trap [#%d] in "
-                 "domain %d on VCPU %d [ec=%04x]\n",
-                 trapstr(trapnr), trapnr, v->domain->domain_id, v->vcpu_id,
-                 regs->error_code);
+        gdprintk(XENLOG_WARNING, "Unhandled %s fault/trap [#%d] "
+                 "on VCPU %d [ec=%04x]\n",
+                 trapstr(trapnr), trapnr, v->vcpu_id, regs->error_code);
 
     return 0;
 }
@@ -570,8 +569,8 @@ int wrmsr_hypervisor_regs(
         if ( idx > 0 )
         {
             gdprintk(XENLOG_WARNING,
-                    "Dom%d: Out of range index %u to MSR %08x\n",
-                    d->domain_id, idx, 0x40000000);
+                     "Out of range index %u to MSR %08x\n",
+                     idx, 0x40000000);
             return 0;
         }
 
@@ -581,8 +580,8 @@ int wrmsr_hypervisor_regs(
              !get_page_and_type(mfn_to_page(mfn), d, PGT_writable_page) )
         {
             gdprintk(XENLOG_WARNING,
-                    "Dom%d: Bad GMFN %lx (MFN %lx) to MSR %08x\n",
-                    d->domain_id, gmfn, mfn, 0x40000000);
+                     "Bad GMFN %lx (MFN %lx) to MSR %08x\n",
+                     gmfn, mfn, 0x40000000);
             return 0;
         }
 
index 1ca80edb382a5654ff8f0a595e6977472ee56828..3a82e7c6aab9a6e517466a91c3b3d28150b7dc1f 100644 (file)
 #define ERROR_EXIT(_errno)                                          \
     do {                                                            \
         gdprintk(XENLOG_WARNING,                                    \
-                "EVTCHNOP failure: domain %d, error %d, line %d\n", \
-                current->domain->domain_id, (_errno), __LINE__);    \
+                "EVTCHNOP failure: error %d\n",                     \
+                (_errno));                                          \
+        rc = (_errno);                                              \
+        goto out;                                                   \
+    } while ( 0 )
+#define ERROR_EXIT_DOM(_errno, _dom)                                \
+    do {                                                            \
+        gdprintk(XENLOG_WARNING,                                    \
+                "EVTCHNOP failure: domain %d, error %d\n",          \
+                (_dom)->domain_id, (_errno));                       \
         rc = (_errno);                                              \
         goto out;                                                   \
     } while ( 0 )
@@ -132,7 +140,7 @@ static long evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc)
     spin_lock(&d->evtchn_lock);
 
     if ( (port = get_free_port(d)) < 0 )
-        ERROR_EXIT(port);
+        ERROR_EXIT_DOM(port, d);
     chn = evtchn_from_port(d, port);
 
     rc = xsm_evtchn_unbound(d, chn, alloc->remote_dom);
@@ -186,11 +194,11 @@ static long evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind)
     lchn = evtchn_from_port(ld, lport);
 
     if ( !port_is_valid(rd, rport) )
-        ERROR_EXIT(-EINVAL);
+        ERROR_EXIT_DOM(-EINVAL, rd);
     rchn = evtchn_from_port(rd, rport);
     if ( (rchn->state != ECS_UNBOUND) ||
          (rchn->u.unbound.remote_domid != ld->domain_id) )
-        ERROR_EXIT(-EINVAL);
+        ERROR_EXIT_DOM(-EINVAL, rd);
 
     rc = xsm_evtchn_interdomain(ld, lchn, rd, rchn);
     if ( rc )
index 9c040477dc05b1062ab7f5e07c5b9bc5a02fa9c4..9c70b9703072c9bdd0cd42da100e310221a12af3 100644 (file)
@@ -524,9 +524,9 @@ long do_set_timer_op(s_time_t timeout)
          * timeout in this case can burn a lot of CPU. We therefore go for a
          * reasonable middleground of triggering a timer event in 100ms.
          */
-        gdprintk(XENLOG_INFO, "Warning: huge timeout set by domain %d "
-                "(vcpu %d): %"PRIx64"\n",
-                v->domain->domain_id, v->vcpu_id, (uint64_t)timeout);
+        gdprintk(XENLOG_INFO,
+                 "Warning: huge timeout set by vcpu %d: %"PRIx64"\n",
+                 v->vcpu_id, (uint64_t)timeout);
         set_timer(&v->singleshot_timer, NOW() + MILLISECS(100));
     }
     else